pub mod huawei_cloud_adapter;
pub mod database_adapter;
pub mod rest_api_adapter;
pub mod adapter_factory;

pub use adapter_factory::AdapterFactory;
pub use huawei_cloud_adapter::HuaweiCloudAdapter;
pub use database_adapter::DatabaseAdapter;
pub use rest_api_adapter::RestApiAdapter;

/// 数据源适配器 trait
//#[async_trait]
pub trait DataSourceAdapter: Send + Sync {
    async fn connect(&self, connection_string: &str) -> Result<()>;
    async fn extract_schema(&self) -> Result<DataSourceSchema>;
    async fn test_connection(&self) -> Result<bool>;
    fn get_name(&self) -> &str;
}